Introduction to Problem Solving
Now a day we use Computers for solving various day-to-day problems and computerisation makes the use of computer to develop software in order to automate any routine human task efficiently, and thus problem solving is an essential skill for a computer engineer.
We know that computers themselves cannot solve a problem. Precise step-by-step instructions should be given by us to solve the problem. Thus, the success of a computer in solving a problem depends on how correctly and precisely we define the problem, design a solution (algorithm) and implement the solution (program) using a programming language. Thus, problem solving is the process of identifying a problem, developing an algorithm for the identified problem and finally implementing the algorithm to develop a computer program.
Design and implementation of efficient programs
The design and development of correct, efficient, and maintainable programs depends on the approach adopted by the programmer to perform various activities that need to be performed during the development process. The entire program or software (collection of programs) development process is divided into a number of phases where each phase performs a well-defined task. Moreover, the output of one phase provides the input for its subsequent phase.
The phases in software development process can be summarized as below:
Requirements Analysis
In this phase, users’ expectations are gathered to know why the program/software has to be built. Then all the gathered requirements are analyzed to pen down the scope or the objective of the overall software product. The last activity in this phase includes documenting every identified requirement of the users in order to avoid any doubts or uncertainty regarding the functionality of the programs. The functionality, capability, performance, availability of hardware and software components are all analyzed in this phase.
Design
The requirements documented in the previous phase acts as an input to the design phase. In the design phase, a plan of actions is made before the actual development process could start. This plan will be followed throughout the development process. Moreover, in the design phase the core structure of the software/program is broken down into modules. The solution of the program is then specified for each module in the form of algorithms, flowcharts, or pseudocodes. The design phase, therefore, specifies how the program/software will be built.
Implementation
In this phase, the designed algorithms are converted into program code using any of the high level languages. The particular choice of language will depend on the type of program like whether it is a system or an application program.
Testing
In this phase, all the modules are tested together to ensure that the overall system works well as a whole product. Although individual pieces of codes are already tested by the programmers in the implementation phase, there is always a chance for bugs to creep in the program when the individual modules are integrated to form the overall program structure.
In this phase, the software is tested using a large number of varied inputs also known as test data to ensure that the software is working as expected by the users’ requirements that were identified in the requirements analysis phase.
Software Deployment, Training, and Support
After the code is tested and the software or the program has been approved by the users, it is then installed or deployed in the production environment. Software Training and Support is a crucial phase which is often ignored by most of the developers. Program designers and developers spend a lot of time to create software but if nobody in an organization knows how to use it or fix up certain problems, then no one would like to use it. Moreover, people are often resistant to change and avoid venturing into an unfamiliar area, so as a part of the deployment phase, it has become very crucial to have training classes for the users of the software.
Maintenance
Maintenance and enhancements are ongoing activities which are done to cope with newly discovered problems or new requirements. Such activities may take a long time to complete as the requirement may call for addition of new code that does not fit the original design or an extra piece of code required to fix an unforeseen problem. As a general rule, if the cost of the maintenance phase exceeds 25% of the prior-phases cost then it clearly indicates that the overall quality of at least one prior phase is poor. In such cases, it is better to re-build the software (or some modules) before maintenance cost is out of control.